<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Shuka189\Controller;

/**
 * Description of Prolist
 *
 * @author SoChishun
 */
class Prolist extends Appbase {

    public function index() {        
        $mCategory=new \XWAM\Model\ProductCategoryModel();
        $id=$mCategory->where(array('code'=>'kami'))->getField('id');
        $aids=$mCategory->getChildIds($id);
        $m_goods = new \XWAM\Model\ProductGoodsModel();
        $list = $m_goods->selectPaging($page, array('where' => array('category_id'=>array('in',$aids)), 'order' => 'id desc'), array('page_params' => $asearch['search']));
        $this->assign('list',$list);
        $this->assign('pager',$page->show());
        $this->display();
    }
}
